<template>
  <svg width="100%" height="1440px" xmlns="http://www.w3.org/2000/svg">
    <g @click="clickG">
      <rect x="0"
            y="0"
            rx="8px"
            width="200"
            height="50"
            class="rectStl"
      ></rect>
    </g>
    <g><path d="M 10 350 q 150 -300 300 0" stroke="blue" stroke-width="5" fill="none" /></g>
  </svg>
</template>

<script lang="js" setup>
const clickG = () => alert("点击svg子元素测试！");
</script>

<style lang="scss" scoped>
.rectStl {
  fill: rgb(255, 255, 0);
  stroke-width: 1;
  stroke: rgb(0, 0, 0);
}
</style>
